package com.kloooong.top.producer;

import com.dingteam.push.api.channel.OrgUserOutput;
import com.dingteam.push.api.message.OrgUserMessage;
import com.kloooong.top.channel.UserVipOutput;
import com.kloooong.top.message.UserVipMember;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

//@Component
//@EnableBinding({OrgUserOutput.class})
public class UserMemberProducer {

//    @Resource(name = OrgUserOutput.OUTPUT)
//    private MessageChannel messageChannel;
//
//
//    public boolean sendVip02(){
//        System.out.println("stream push alread...");
//        OrgUserMessage orgUser = new OrgUserMessage();
//        orgUser.setCorpId("0001");
//        MessageBuilder builder = MessageBuilder.withPayload(orgUser)
//                .setHeader("syncAction","user_leave_org")
//                .setHeader("suiteId","12345666");
//        return messageChannel.send(builder.build());
//    }

}
